/* $RCSFile: ADNDynCompetitor.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynCompetitor.cs $
 * $log$
 * Revision 19 2010/10/02 14:01:48  christian.surieux
 *   Corrected a bug in allmost everyADNDyn file for PrimaryFieldVualue
 * Revision 6 2010/08/06 19:56:32  christian.surieux
 *   Added Log to All cs files
 */

/* Copyrights Christian Surieux 2010 */
/* Class ADNDynCompetitor */
/* Date 2010-01-06 16:04:23Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;

namespace AddonNice.CRMWrapper
{
    public class ADNDynCompetitor : DynEntity
    {
        protected class Ftor: DFactor
        {
            public Ftor() : base(CrmStr.competitor)
            {}

            public override Type DynType
            { get { return typeof(ADNDynCompetitor); } }

            public override string DynTypename
            { get { return CrmStr.competitor; } }

            public override DynEntity Build()
            {   return new ADNDynCompetitor();}

            public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
            {   return new ADNDynCompetitor(w, dEntity, wproperties, null);}

            public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
            {   return new ADNDynCompetitor(w,PrimaryFieldValue);}

            public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
            {   return new ADNDynCompetitor(w,PrimaryKeyValue);}
        }

        static ADNDynCompetitor(){new Ftor();} 

        public override bool HasOwnerProperty
        {
            get { return false; }
        }

        public ADNDynCompetitor() : base() { }

        public ADNDynCompetitor(CRMWrapperBase w,string PrimaryFieldValue)
            : base(w,CrmStr.competitor)
        {
            if ( PrimaryFieldValue != string.Empty )
                name = PrimaryFieldValue;
        }

        public ADNDynCompetitor(CRMWrapperBase w,Guid CrmId) : base(w,CrmStr.competitor,CrmId) { }

        public ADNDynCompetitor(CRMWrapperBase w,InternalDynamicEntity e) : base(w,CrmStr.competitor,e,null,null) { }

        public ADNDynCompetitor(CRMWrapperBase w,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(w,CrmStr.competitor,e,prop,s) { }

        public ADNDynCompetitor(ResetWrapperHandler fn,string PrimaryFieldValue)
            : base(fn,CrmStr.competitor)
        {
            if ( PrimaryFieldValue != string.Empty )
                name = PrimaryFieldValue;
        }

        public ADNDynCompetitor(ResetWrapperHandler fn,Guid CrmId) : base(fn,CrmStr.competitor,CrmId) { }

        public ADNDynCompetitor(ResetWrapperHandler fn,InternalDynamicEntity e) : base(fn,CrmStr.competitor,e,null,null) { }

        public ADNDynCompetitor(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(fn,CrmStr.competitor,e,prop,s) { }

        /* Properties */

        [CrmDynAttribute(CrmStr.competitor)]
        public Guid competitorid
        {
            get
            { return KeyPropertyValue(CrmStr.competitorid); }
            set
            { AddKeyProperty(CrmStr.competitorid,value); }
        }

        protected override void SetCrmIdProperty(Guid crmId)
        {
            if ( !dicProperty.ContainsKey(CrmStr.competitorid) || KeyPropertyValue(CrmStr.competitorid) != crmId )
                competitorid = crmId;
        }
        public override Guid PrimaryKeyGuidValue
        {
            get
            { return competitorid; }
            set { competitorid = value; }
        }
        public override string PrimaryFieldName
        {
            get
            { return CrmStr.name; }
            set
            {}
        }

        /// <summary>
        /// Value contained in the PrimaryField for the DynEntity or empty if no PrimaryField
        /// </summary>
        public override string PrimaryFieldStringValue
        {
            get
            {
                return name;
            }
            set
            {
                name =   value;
            }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address1_addresstypecode
        {
            get
            { return PicklistPropertyIntValue(CrmStr.address1_addresstypecode); }
            set
            { AddPicklistProperty(CrmStr.address1_addresstypecode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_addresstypecodename
        {
            get
            { return StringPropertyValue(CrmStr.address1_addresstypecodename); }
            set
            { AddStringProperty(CrmStr.address1_addresstypecodename,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_city
        {
            get
            { return StringPropertyValue(CrmStr.address1_city); }
            set
            { AddStringProperty(CrmStr.address1_city,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_country
        {
            get
            { return StringPropertyValue(CrmStr.address1_country); }
            set
            { AddStringProperty(CrmStr.address1_country,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_county
        {
            get
            { return StringPropertyValue(CrmStr.address1_county); }
            set
            { AddStringProperty(CrmStr.address1_county,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_fax
        {
            get
            { return StringPropertyValue(CrmStr.address1_fax); }
            set
            { AddStringProperty(CrmStr.address1_fax,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public double address1_latitude
        {
            get
            { return DoublePropertyValue(CrmStr.address1_latitude); }
            set
            { AddFloatProperty(CrmStr.address1_latitude,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_line1
        {
            get
            { return StringPropertyValue(CrmStr.address1_line1); }
            set
            { AddStringProperty(CrmStr.address1_line1,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_line2
        {
            get
            { return StringPropertyValue(CrmStr.address1_line2); }
            set
            { AddStringProperty(CrmStr.address1_line2,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_line3
        {
            get
            { return StringPropertyValue(CrmStr.address1_line3); }
            set
            { AddStringProperty(CrmStr.address1_line3,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public double address1_longitude
        {
            get
            { return DoublePropertyValue(CrmStr.address1_longitude); }
            set
            { AddFloatProperty(CrmStr.address1_longitude,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_name
        {
            get
            { return StringPropertyValue(CrmStr.address1_name); }
            set
            { AddStringProperty(CrmStr.address1_name,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_postalcode
        {
            get
            { return StringPropertyValue(CrmStr.address1_postalcode); }
            set
            { AddStringProperty(CrmStr.address1_postalcode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_postofficebox
        {
            get
            { return StringPropertyValue(CrmStr.address1_postofficebox); }
            set
            { AddStringProperty(CrmStr.address1_postofficebox,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address1_shippingmethodcode
        {
            get
            { return PicklistPropertyIntValue(CrmStr.address1_shippingmethodcode); }
            set
            { AddPicklistProperty(CrmStr.address1_shippingmethodcode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_shippingmethodcodename
        {
            get
            { return StringPropertyValue(CrmStr.address1_shippingmethodcodename); }
            set
            { AddStringProperty(CrmStr.address1_shippingmethodcodename,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_stateorprovince
        {
            get
            { return StringPropertyValue(CrmStr.address1_stateorprovince); }
            set
            { AddStringProperty(CrmStr.address1_stateorprovince,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_telephone1
        {
            get
            { return StringPropertyValue(CrmStr.address1_telephone1); }
            set
            { AddStringProperty(CrmStr.address1_telephone1,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_telephone2
        {
            get
            { return StringPropertyValue(CrmStr.address1_telephone2); }
            set
            { AddStringProperty(CrmStr.address1_telephone2,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_telephone3
        {
            get
            { return StringPropertyValue(CrmStr.address1_telephone3); }
            set
            { AddStringProperty(CrmStr.address1_telephone3,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address1_upszone
        {
            get
            { return StringPropertyValue(CrmStr.address1_upszone); }
            set
            { AddStringProperty(CrmStr.address1_upszone,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address1_utcoffset
        {
            get
            { return NumberPropertyValue(CrmStr.address1_utcoffset); }
            set
            { AddNumberProperty(CrmStr.address1_utcoffset,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address2_addresstypecode
        {
            get
            { return PicklistPropertyIntValue(CrmStr.address2_addresstypecode); }
            set
            { AddPicklistProperty(CrmStr.address2_addresstypecode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_addresstypecodename
        {
            get
            { return StringPropertyValue(CrmStr.address2_addresstypecodename); }
            set
            { AddStringProperty(CrmStr.address2_addresstypecodename,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_city
        {
            get
            { return StringPropertyValue(CrmStr.address2_city); }
            set
            { AddStringProperty(CrmStr.address2_city,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_country
        {
            get
            { return StringPropertyValue(CrmStr.address2_country); }
            set
            { AddStringProperty(CrmStr.address2_country,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_county
        {
            get
            { return StringPropertyValue(CrmStr.address2_county); }
            set
            { AddStringProperty(CrmStr.address2_county,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_fax
        {
            get
            { return StringPropertyValue(CrmStr.address2_fax); }
            set
            { AddStringProperty(CrmStr.address2_fax,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public double address2_latitude
        {
            get
            { return DoublePropertyValue(CrmStr.address2_latitude); }
            set
            { AddFloatProperty(CrmStr.address2_latitude,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_line1
        {
            get
            { return StringPropertyValue(CrmStr.address2_line1); }
            set
            { AddStringProperty(CrmStr.address2_line1,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_line2
        {
            get
            { return StringPropertyValue(CrmStr.address2_line2); }
            set
            { AddStringProperty(CrmStr.address2_line2,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_line3
        {
            get
            { return StringPropertyValue(CrmStr.address2_line3); }
            set
            { AddStringProperty(CrmStr.address2_line3,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public double address2_longitude
        {
            get
            { return DoublePropertyValue(CrmStr.address2_longitude); }
            set
            { AddFloatProperty(CrmStr.address2_longitude,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_name
        {
            get
            { return StringPropertyValue(CrmStr.address2_name); }
            set
            { AddStringProperty(CrmStr.address2_name,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_postalcode
        {
            get
            { return StringPropertyValue(CrmStr.address2_postalcode); }
            set
            { AddStringProperty(CrmStr.address2_postalcode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_postofficebox
        {
            get
            { return StringPropertyValue(CrmStr.address2_postofficebox); }
            set
            { AddStringProperty(CrmStr.address2_postofficebox,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address2_shippingmethodcode
        {
            get
            { return PicklistPropertyIntValue(CrmStr.address2_shippingmethodcode); }
            set
            { AddPicklistProperty(CrmStr.address2_shippingmethodcode,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_shippingmethodcodename
        {
            get
            { return StringPropertyValue(CrmStr.address2_shippingmethodcodename); }
            set
            { AddStringProperty(CrmStr.address2_shippingmethodcodename,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_stateorprovince
        {
            get
            { return StringPropertyValue(CrmStr.address2_stateorprovince); }
            set
            { AddStringProperty(CrmStr.address2_stateorprovince,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_telephone1
        {
            get
            { return StringPropertyValue(CrmStr.address2_telephone1); }
            set
            { AddStringProperty(CrmStr.address2_telephone1,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_telephone2
        {
            get
            { return StringPropertyValue(CrmStr.address2_telephone2); }
            set
            { AddStringProperty(CrmStr.address2_telephone2,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_telephone3
        {
            get
            { return StringPropertyValue(CrmStr.address2_telephone3); }
            set
            { AddStringProperty(CrmStr.address2_telephone3,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string address2_upszone
        {
            get
            { return StringPropertyValue(CrmStr.address2_upszone); }
            set
            { AddStringProperty(CrmStr.address2_upszone,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int address2_utcoffset
        {
            get
            { return NumberPropertyValue(CrmStr.address2_utcoffset); }
            set
            { AddNumberProperty(CrmStr.address2_utcoffset,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public decimal exchangerate
        {
            get
            { return DecimalPropertyValue(CrmStr.exchangerate); }
            set
            { AddDecimalProperty(CrmStr.exchangerate,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string keyproduct
        {
            get
            { return StringPropertyValue(CrmStr.keyproduct); }
            set
            { AddStringProperty(CrmStr.keyproduct,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public override string name
        {
            get
            { return StringPropertyValue(CrmStr.name); }
            set
            { AddStringProperty(CrmStr.name,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string opportunities
        {
            get
            { return StringPropertyValue(CrmStr.opportunities); }
            set
            { AddStringProperty(CrmStr.opportunities,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public override Guid organizationid
        {
            get
            { return LookupPropertyValue(CrmStr.organizationid); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string overview
        {
            get
            { return StringPropertyValue(CrmStr.overview); }
            set
            { AddStringProperty(CrmStr.overview,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string referenceinfourl
        {
            get
            { return StringPropertyValue(CrmStr.referenceinfourl); }
            set
            { AddStringProperty(CrmStr.referenceinfourl,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public decimal reportedrevenue
        {
            get
            { return MoneyPropertyValue(CrmStr.reportedrevenue); }
            set
            { AddMoneyProperty(CrmStr.reportedrevenue,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public decimal reportedrevenue_base
        {
            get
            { return MoneyPropertyValue(CrmStr.reportedrevenue_base); }
            set
            { AddMoneyProperty(CrmStr.reportedrevenue_base,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int reportingquarter
        {
            get
            { return NumberPropertyValue(CrmStr.reportingquarter); }
            set
            { AddNumberProperty(CrmStr.reportingquarter,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int reportingyear
        {
            get
            { return NumberPropertyValue(CrmStr.reportingyear); }
            set
            { AddNumberProperty(CrmStr.reportingyear,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string stockexchange
        {
            get
            { return StringPropertyValue(CrmStr.stockexchange); }
            set
            { AddStringProperty(CrmStr.stockexchange,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string strengths
        {
            get
            { return StringPropertyValue(CrmStr.strengths); }
            set
            { AddStringProperty(CrmStr.strengths,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string threats
        {
            get
            { return StringPropertyValue(CrmStr.threats); }
            set
            { AddStringProperty(CrmStr.threats,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string tickersymbol
        {
            get
            { return StringPropertyValue(CrmStr.tickersymbol); }
            set
            { AddStringProperty(CrmStr.tickersymbol,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public int timezoneruleversionnumber
        {
            get
            { return NumberPropertyValue(CrmStr.timezoneruleversionnumber); }
            set
            { AddNumberProperty(CrmStr.timezoneruleversionnumber,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public Guid transactioncurrencyid
        {
            get
            { return LookupPropertyValue(CrmStr.transactioncurrencyid); }
            set
            { AddLookupProperty(CrmStr.transactioncurrencyid,CrmStr.transactioncurrency,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string transactioncurrencyidName
        {
            get
            { return LookupPropertyName(CrmStr.transactioncurrencyid); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string weaknesses
        {
            get
            { return StringPropertyValue(CrmStr.weaknesses); }
            set
            { AddStringProperty(CrmStr.weaknesses,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string websiteurl
        {
            get
            { return StringPropertyValue(CrmStr.websiteurl); }
            set
            { AddStringProperty(CrmStr.websiteurl,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public double winpercentage
        {
            get
            { return DoublePropertyValue(CrmStr.winpercentage); }
            set
            { AddFloatProperty(CrmStr.winpercentage,value); }
        }

        [CrmDynAttribute(CrmStr.competitor)]
        public string yominame
        {
            get
            { return StringPropertyValue(CrmStr.yominame); }
            set
            { AddStringProperty(CrmStr.yominame,value); }
        }

    }
}